package 第七周.homework;
//Fiction.java
//Represents a Fiction, which is a reading martial .Used to demonstrates
//inheritance.
public class Fiction  extends ReadingMaterial{
    private int definitions = 5201314;
    //Prints a message using both local and inherited values.
    public double computeRatio()
    {
        return (double)definitions/pages;
    }
    //Prints a message using both local and inherited method.
    public double pictureaverage()
    {
        return(double)illustrations/pages;
    }
    //Definitions mutator.
    public void setDefinitions(int numDefinitions)
    {
        definitions=numDefinitions;
    }
    //Definitions accessor.
    public int getDefinitions()
    {
        return definitions;
    }
}
